<template>
  <view class="flex items-center justify-between">
    <up-search
      v-model="searchValue"
      :showAction="false"
      height="64rpx"
      bgColor="#fff"
      borderColor="#B8B9BF"
      :placeholder="placeholder"
      @search="onSearch"
    ></up-search>
    <view class="icon" @click="toLink">
      <up-icon name="bell-fill" color="#46A7FD" size="36rpx"></up-icon>
    </view>
  </view>
</template>

<script setup>
import { ref } from "vue";
const searchValue = ref('');
let emit = defineEmits(["search"]);
const props = defineProps({
  placeholder: {
    type: String,
    default: "请输入搜索内容",
  },
});
function onSearch(){
  emit("search", searchValue.value);
}
function toLink (){
  uni.navigateTo({ url: '/community/myMessage/myMessage' })
}
</script>

<style lang="scss" scoped>
.icon {
  @apply flex items-center justify-center w-[64rpx] h-[64rpx] bg-[#fff] rounded-full border border-[#B8B9BF] ml-[24rpx];
}
</style>
